This external displays an alert window with text you put into it using ResEdit or passing text thru the external. It allows you to use different items including icons, pictures etc. When you display the same alert several times after the other the stage info is normally used. This means you can set the default button and number of sounds for each occurence withing the ALRT resource.
Usage:
item := RR Alert ( resource ; message0…message3, type )
where:
item
is an integer returning the item number the user clicked to exit the alert.
-1 indicates the external was unable to display the alert.
1 (should be) the OK button.
resource
This is an long integer containing the ALRT resource number to use.
See the 4D v3 Language Reference about using resource numbers.
message0…message3
Whenever you used in the ALRT resource within static text the signs '^0' thru '^3' the strings (max. 255 characters) replace each of these.
You can also pass a string resource number in the same way you can use them with 4D for menus, buttons and static layout text. If message0 contains ":-16415,1" every occurence of the characters '^0' will be replaced with the contents of item 1 of STR# resource -16415 (inside the system file). When a STR# respource can't be found nothing will be displayed.
String resource -16395 in the System file contains the names of Macintosh machine types. Normally item 0 is not available, but when you use ":-16395,0" it will automatically get to the item with the name of the Macintosh you are currently using.
The system font (with most systems Chicago) will be used to display the messages.
type
is an integer by which you can indicate what kind of standard icon is displayed in the top-left corner:
0 stop icon
1 note icon
2 warning icon
3 no icon
All other types are reserved and should not be used.